{php $toupiaoyonghu = '1_quan_toupiaobiao';}
{count action=table table=$toupiaoyonghu cid=$t.id return=tp}

<div class="d-kuan d-shang-15" onclick="location.href='{dr_son_url($t)}'">
	<div class="d-kuan d-wenzi-juzhong   "> 已投</span> <span class="d-wenzi-18 d-zitiyanse-hongse">{$tp_count}</span> <span class="ziti-10 huise-10">票</span></div>
	{if $t.toupiaomoshi == 1}
	    <div class="d-kuan d-wenzi-juzhong d-wenzi-18 d-zitiyanse-hongse d-jiacu"> 单选投票</div>
	{else}
	   <div class="d-kuan d-wenzi-juzhong d-wenzi-18 d-zitiyanse-hongse d-jiacu"> 多选投票</div>
	{/if}
	<div class="d-kuan d-wenzi-juzhong d-wenzi-14 d-zitiyanse-hongse ">
		
		{if strtotime($t.ptjssj) < time()}
			投票活动已经结束
		{else}
		    结束： {$t.ptjssj} 
		{/if}
	</div>
	{if $t.tpzsfs ==1}
		{loop $t.tpxm $i $v}
		    {if $i <= '6'}
			    {count action=table table=$toupiaoyonghu cid=$t.id  toupiaoid=$i return=tptongji}
			    <div class="d-kuan d-xian-1 d-shang-15 d-yuanjiao-10 d-beijing-hui d-neikuang-10">
				{$i}. {$v[1]}
				<div class="d-yuanjiao-20 d-kuan d-buhuanhang d-a-hei">
					{if $tptongji_count > 0}
					<div class="d-yuanjiao-20 d-kuan d-buhuanhang d-a-hei">
						{table table=$toupiaoyonghu toupiaoid=$i cid=$t.id order=inputtime_desc num=15 return=tp2}
							<a href="/index.php?s=huiyuan&c=show&m=index&uid={$tp2.uid}" class="d-touxiang-30-0">
								<img src="{dr_avatar($tp2.uid)}" class=" d-yuanjiao-50"  width="25" height="25"/>
							</a>
						{/table}
					
					</div>
					{/if}
				</div>
				
				<div class="d-kuan d-buhuanhang">
					<div class="d-kuan ">
						<div class="progress d-shang-10 d-xia-10 ">
						    {if $tp_count >0}
							{php $tj = ($tptongji_count / $tp_count)*100;}
							{else}
							{php $tj = 0;}
							{/if}
							
							<div class="progress-bar " role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:{$tj}%">
							{$tptongji_count}
							</div>
						</div>
					</div>
					<div class="d-kuan-70 d-shang-4">
						<div class="d-kuan">
							<div class="zuo-5 ziti-18 pull-right you-1 wenzihongse a hanggai-12 d-quxian-0" >
								<a class="wenzihongse d-toupiao d-zitiyanse-hongse" id="tag_toupiao_{$id}_{$i}" data-id="{$id}" data-value="{$i}" >投票</a>
							</div>
						</div>
					</div>
				</div>
				
			</div>
			{/if}
		{/loop}
	{else}
	<div class="row d-shang-15">
		<div class="" id="toupiaozu-{$t.id}">
		{loop $t.tpxm $i $v}
		{if $i <= '6'}
		<div class="col-md-4 col-xs-4 liebiaotu-zhong d-yuanjiao-10 xia-20 a">
			<img src="{dr_get_file($v[2])}" class="d-yuanjiao-10"/>
			{count action=table table=$toupiaoyonghu cid=$t.id  toupiaoid=$i return=tptongji}
			
			<div class="d-kuan d-xian-1 d-shang-15 d-yuanjiao-10 d-beijing-hui d-neikuang-10">
				{$i}. {$v[1]}
				
				
				<div class="d-kuan ">
					<div class="d-kuan ">
						<div class="progress d-shang-10 d-xia-10 ">
							{if $tp_count >0}
							{php $tj = ($tptongji_count / $tp_count)*100;}
							{else}
							{php $tj = 0;}
							{/if}
							<div class="progress-bar " role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:{$tj}%">
							{$tptongji_count}
							</div>
						</div>
					</div>
					<div class="d-shang-4">
						<div class="d-kuan">
							<div class="d-wenzi-juzhong" >
								<a class="wenzihongse d-toupiao d-zitiyanse-hongse" id="tag_toupiao_{$id}_{$i}" data-id="{$id}" data-value="{$i}" >投票</a>
							</div>
						</div>
					</div>
				</div>
				<div class="d-clear"></div>
			</div>
		</div>
		{/if}
		{/loop}
		</div>
		</div>
	{/if}
</div>

<style>
	.d-beijingyanse-hong {
		background-color: #fff6f6;
		border-radius: 10px !important;
	}
	.xia-20 {
		margin-bottom: 20px;
		
	}
	.progress {
	    height: 12px;
	    background-color: #ededed;
	    border-radius: 50px;
	}
	.progress-bar {
	    float: left;
	    width: 0;
	    height: 100%;
	    font-size: 12px;
	    line-height: 12px;
	    color: #fff;
	    background-color: #f85f05;
	    -webkit-box-shadow: inset 0 -1px 0 rgba(255,255,255,.15);
	    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
	    -webkit-transition: width .6s ease;
	    -o-transition: width .6s ease;
	    transition: width .6s ease;
	}
	.d-beijing-hui {
	    background-color: #f9f9f9;
	}
	.d-touxiang-30-0 {
	    margin-right: -10px;
	    /*background-color: #ffffff;*/
	    border-radius: 50px;
	    /*box-shadow: 0 -3px 6px rgb(0 0 0 / 100%);*/
		
	    
	}
	.d-touxiang-30-0 img{
	    max-width: 100%;
	    margin-bottom: 0px;
	    background-color: #ffffff;
		border: 2px solid #ffffff;
		width: 25px;
	}
</style>
